package com.heima.user.feign;

import com.heima.common.dto.ResponseResult;
import com.heima.user.dto.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 自媒体暴露的feign接口
 *
 * @Name : MediaFeign
 * @Author : WuQiang
 * @Date : 2022-10-05 17:25
 * @Description : 自媒体暴露的feign接口
 */
@FeignClient(value = "leadnews-media")
public interface MediaFeign {

    /**
     * 新增自媒体用户
     */
    @PostMapping(value = "/api/v1/user")
    ResponseResult<WmUser> saveUser(@RequestBody WmUser user);

    /**
     * 更新自媒体用户
     */
    @PutMapping(value = "/api/v1/user")
    ResponseResult<WmUser> updateUser(@RequestBody WmUser user);
}
